/**
 * Copyright 2017-2025 Evergrande Group.
 */
package com.example.cdtutils;


import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;


/**
 * uuid 生成器.
 *
 * @author zhuxiuhong
 * @since 2018年2月11日
 */
public class UUIDUtil {

    private UUIDUtil() {
    }

    public static String getUUID() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyMMddHHmmssSSS");
        StringBuilder id = new StringBuilder(sdf.format(new Date()));
        DecimalFormat df = new DecimalFormat("000000000");
        String random = df.format(new Random().nextInt(999999999));
        id.append(random);
        return String.valueOf(id);
    }

    public static void main(String[] arg) {
        System.out.println(getUUID());
    }

}
